package edu.zqu.collegeField.framework.openfeign.api;

import edu.zqu.collegeField.framework.openfeign.fallback.GetCollegeNameFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.math.BigInteger;

@FeignClient(name = "GetCollegeName", url = "http://localhost:8600/instructionalMatters", fallback = GetCollegeNameFallback.class)
@Primary
public interface GetCollegeNameApi {
    @RequestMapping(value = "/getCollegeName/{id}", method = RequestMethod.GET)
    String getCollegeName(@PathVariable BigInteger id);
}
